<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Myfuns</title>
<script src="deBug.js" ></script>
<script src="Myfuns.js" ></script>
<script src="drowAndDrop.js" ></script>
<style>
	#disp {
		border:1px solid green;
		position:absolute;
		top:50px;
		left:50px;
		width:50px;
		height:50px;
		background:green;
		}
	
	#disp p {
		border:1px solid blue;
		height:50px;
	}
		
</style>
</head>

<body>

<div id="disp">

</div>

</body>

<script>

var drow = $obj("disp")
drow.onmousedown = function(){
	ev = arguments[0] || window.event;
	this.style.cursor = "move";
	
	
	this.onmousemove =function(){
		this.pos = getMousePos(ev)
		drow.style.left = this.pos.x
		drow.style.top = this.pos.y
		deBug(this.pos.x)
	}
}

drow.onmouseup = function(){
	this.style.cursor = ""
}

drow.onmouseout = function(){
	this.style.cursor = ""
}

</script>
</html>
